import myAxios from "../utils/request.js";

// 获取所有事件
export const getAllEvents = async () => {
    const res = await myAxios.request({
        url: "/analysis/getAllEvents",
        method: "GET",
        // data: params,
    });
    return res;
}

// 根据id获取文章
export const getArticlesById = async (id) => {
    const res = await myAxios.request({
        url: "/analysis/getArticlesById" + "?e_id=" + id,
        method: "GET",
        // data: params,
    });
    return res;
}

// 根据id获取评论
export const getCommentsById = async (id) => {
    const res = await myAxios.request({
        url: "/analysis/getCommentsById" + "?e_id=" + id,
        method: "GET",
        // data: params,
    });
    return res;
}

export const test = async (id) => { 
    const res = await myAxios.request({
        url: "/analysis/test"+ "?e_id=" + id,
        method: "GET",
        // data: params,
    });
    return res;
}

export const eventAnalysisInit = async (id) => { 
    const res = await myAxios.request({
        url: "/analysis/eventAnalysisInit" + "?e_id=" + id,
        method: "GET",
        // data: params,
    });
    return res;
}